<template>
	<view style="width: 100%;height: auto;background: white;">
		<view id="home" style="justify-content: space-between;padding: 20rpx;"
			class="home acea-row row-center-wrapper iconfont icon-xiangzuo h5_back" @tap="returns">
		</view>
		<web-view class="web-view" :src="storylink" style="width: 100%;height: auto;margin-top: 100rpx;"></web-view>
	</view>
</template>
<script>
	const app = getApp();
	const comUrl = "https://pic.mae.vip/%E4%BA%BA%E5%83%8F%E5%AE%9E%E6%88%98%E7%8F%AD%E7%B4%A0%E6%9D%90/";
	//import openApp from './components/openApp.vue';
	import {
		getStoryList
	} from '@/api/case.js';

	import {
		addClickRecord,
	} from '@/api/home.js';
	import {
		loginMobile,
	} from "@/api/user";
	import {
		mapGetters
	} from "vuex";
	import animationType from '@/utils/animationType.js'
	import {
		ref
	} from 'process';

	export default {
		components: {

		},
		data() {
			return {
				moreicon: '../../static/images/usercase/morearrow.png',
				locationicon: '../../static/images/usercase/dingwei.png',
				img: 'https://pic.mae.vip//crmebimage/public/product/2025/09/06/ea5d9b3d1e934843b2ccde824c634fa9bprsuegg1x.jpg',
				userId: '',
				token: '',
				phone: '',
				platform: uni.getSystemInfoSync().platform, //手机类型
				page: 1,
				limit: 10,
				listData: [],
				hasMore: true,
				storylink: 'https://mp.weixin.qq.com/s?__biz=MjM5MTY4NjUyOA==&mid=2654035962&idx=1&sn=5c07b320ee8d88ee7c4198215e4f7e2b&poc_token=HOmf0GijbqC2y3zJOUefize5xxUF4H_4tbebe1ew',
			}
		},
		created() {
			let that = this;
		},
		mounted: function() {
			let that = this;
			// document.querySelector('meta[http-equiv="Content-Security-Policy"]').setAttribute('content',
			// 	'frame-ancestors https://mp.weixin.qq.com')
		},
		onPageScroll(res) { //、、、、、
			let that = this;
		},
		onReachBottom() {
			let that = this;
		},
		onLoad(options) {
			let that = this;
			that.token = options.token;
			that.userId = options.userId;
			//that.storylink = options.storylink;

			//that.getData();
		},
		beforeDestroy() {
			uni.$off('pageScroll'); // 避免内存泄漏
		},
		methods: {
			returns() {
				console.log('----!!!  ')
				uni.navigateBack();
			},
			toInfo(p) {
				let that = this;
				uni.navigateTo({
					animationType: animationType.type,
					animationDuration: animationType.duration,
					url: '/pages/usercase/userinfo?userId=' + that.userId + '&token=' + that.token +
						'&studentid=' + p.student_id,
				})
			},
			getData() {
				let that = this;
				let p = {};
				p.userId = that.userId;
				p.token = that.token;
				p.page = that.page;
				p.limit = that.limit;
				getStoryList(p).then(res => {
					if (res.code == 0) {
						let arr = res.data;
						if (arr.length < that.limit) {
							that.hasMore = false;
						}
						that.$nextTick(() => {
							if (that.page == 1) {
								that.listData = [];
							}
							arr.forEach((item, index) => {
								that.listData.push(item)
							});
						})
					}
				})
			},
			jqueryUrl(url) {
				let arr = url.split('?');
				let params = arr[1].split('&');
				let obj = {};
				for (let i = 0; i < params.length; i++) {
					let param = params[i].split('=');
					obj[param[0]] = param[1];
				}
				return obj;
			},
		}
	}
</script>

<style lang="scss" scoped>
	page,
	body {
		height: 100%;
		width: 100%;
		background: white !important;
	}

	.userview {
		height: 130rpx;
		width: 100%;
		background: #fff;
		border-bottom-left-radius: 16rpx;
		border-bottom-right-radius: 16rpx;
		margin-top: -10rpx;
		display: grid;

		.username {
			display: flex;
			align-items: center;
			align-items: center;
			justify-content: space-between;
			margin: 20rpx;
			width: calc(100% - 40rpx);
			color: #333333;
		}

		image {
			width: 20rpx;
			height: 20rpx;
		}

		.location {
			font-size: 20rpx;
			display: flex;
			align-items: center;
			color: #666666;
		}

		.banji {
			padding-left: 20rpx;
		}
	}

	.videostyle {
		width: 100%;
		border-top-left-radius: 16rpx;
		border-top-right-radius: 16rpx;
		height: 200rpx;
		margin-top: 10rpx;
	}

	.singleShow {
		margin: 10rpx;
		width: calc(100% - 20rpx);
		background: #fff;
		border-radius: 10rpx;
		height: auto;
		padding-bottom: 20rpx;

		.titleView {
			display: flex;
			align-items: center;
			align-items: center;
			justify-content: space-between;
			margin: 20rpx;
			width: calc(100% - 40rpx);
			padding-top: 20rpx;
		}

		.subtitle {
			font-size: 30rpx;
			font-weight: 600;
		}

		.lookall {
			font-size: 24rpx;
			line-height: 24rpx;
			display: flex;
			align-items: center;
			color: #ea5550;
		}

		image {
			width: 30rpx;
			height: 30rpx;
		}

		.imgstyle {
			width: calc(100% - 20rpx);
			margin: 0rpx 10rpx;
		}
	}



	.image {
		width: 25px;
		height: 25px;
	}

	.text {
		font-size: 14px;
		margin-top: 5px;
	}


	.grid-dynamic-box {
		margin-bottom: 15px;
	}

	.grid-item-box {
		flex: 1;
		// position: relative;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 15px 0;
	}

	.grid-item-box-row {
		flex: 1;
		// position: relative;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding: 15px 0;
	}

	.bottom {
		height: 100%;
		height: 100rpx;
		background: #f5f5f5;
		display: flex;
		justify-content: center;

		button {
			background: #fff;
			width: 200rpx;
			height: 60rpx;
			border-radius: 30rpx;
			font-size: 24rpx;
			line-height: 60rpx;
			margin-top: 20rpx;
		}
	}
</style>